package br.com.fatecpg.projetohoroscopo;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		Button buttonSigAries = (Button) findViewById(R.id.buttonSigAries);
		Button buttonSigTouro = (Button) findViewById(R.id.buttonSigTouro);
		Button buttonSigGemeos = (Button) findViewById(R.id.buttonSigGemeos);
		Button buttonSigCancer = (Button) findViewById(R.id.buttonSigCancer);
		Button buttonSigLeao = (Button) findViewById(R.id.buttonSigLeao);
		Button buttonSigVirgem = (Button) findViewById(R.id.buttonSigVirgem);
		Button buttonSigLibra = (Button) findViewById(R.id.buttonSigLibra);
		Button buttonSigEscorpiao = (Button) findViewById(R.id.buttonSigEscorpiao);
		Button buttonSigSagitario = (Button) findViewById(R.id.buttonSigSagitario);
		Button buttonSigCapricornio = (Button) findViewById(R.id.buttonSigCapricornio);
		Button buttonSigAquario = (Button) findViewById(R.id.buttonSigAquario);
		Button buttonSigPeixes = (Button) findViewById(R.id.buttonSigPeixes);

		buttonSigAries.setOnClickListener(this);
		buttonSigTouro.setOnClickListener(this);
		buttonSigGemeos.setOnClickListener(this);
		buttonSigCancer.setOnClickListener(this);
		buttonSigLeao.setOnClickListener(this);
		buttonSigVirgem.setOnClickListener(this);
		buttonSigLibra.setOnClickListener(this);
		buttonSigEscorpiao.setOnClickListener(this);
		buttonSigSagitario.setOnClickListener(this);
		buttonSigCapricornio.setOnClickListener(this);
		buttonSigAquario.setOnClickListener(this);
		buttonSigPeixes.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		int tag = Integer.parseInt(v.getTag().toString());

		Intent intent = new Intent(this, HoroscopoDiaActivity.class);
		intent.putExtra("tagSigno", tag);

		startActivity(intent);

	}

}
